unit uTileSet;

interface

uses
  Graphics, SysUtils, ExtCtrls, Types, Dialogs;

const
  TileInPixel: Integer = 64;
  endung: string = '.bmp';
  endung_transparent: string = '.ico';

type
  TGameTileSet = class(TPicture)
  private
    { Private declarations }
  public
    { Public declarations }
    name: String;
    procedure load(flag: boolean);
  end;

implementation

procedure TGameTileSet.load(flag: boolean);
var
  s: string;
begin
  if (FileExists('.\Images\Tiles\' + name + endung)) then
    begin
      LoadFromFile('.\Images\Tiles\' + name + endung);
    end
  else if (FileExists('.\Images\Tiles\' + name + endung_transparent)) then
    begin
      LoadFromFile('.\Images\Tiles\' + name + endung_transparent);
    end;
end;

end.
